<template>
<div ref="Radar" class="radar-echart" style="width: 500px;height: 400px;" />
</template>

<script>
import * as echarts from 'echarts/core'
import {
	TitleComponent,
	LegendComponent,
	TooltipComponent
} from 'echarts/components'
import {
	RadarChart
} from 'echarts/charts'
import {
	CanvasRenderer
} from 'echarts/renderers'
echarts.use(
	[TitleComponent, LegendComponent, RadarChart, CanvasRenderer, TooltipComponent]
)
export default {
	props: {
		Radaroptions: {
			type: Object
		}
	},
	data() {
		return {
			options: {
				tooltip: {
				},
				radar: {
					// shape: 'circle',
					indicator: [{
						name: '工作效率',
						max: 100
					},
					{
						name: '考勤',
						max: 100
					},
					{
						name: '积极性',
						max: 100
					},
					{
						name: '帮助同事',
						max: 100
					},
					{
						name: '自主学习',
						max: 100
					},
					{
						name: '正确率',
						max: 100
					}
					]
				},
				series: [{
					type: 'radar',
					// areaStyle: {normal: {}},
					data: [{
						value: [78, 80, 100, 69, 100, 84],
						name: '张三'
					},
					{
						value: [50, 50, 50, 50, 50, 10],
						name: '李四'
					}
					]
				}]
			}
		}
	},
	mounted() {
		const chartDom = this.$refs.Radar
		const Radar = echarts.init(chartDom)
		Radar.setOption(this.options)
		console.log(Radar)
	}
}
</script>

<style>
</style>
